package com.yswy.backstage.param;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;
import java.io.Serializable;

/**
 * This is Description
 *
 * @author linlifu
 * @date 2020/01/07
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RolePARAM implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "角色ID不能为空", groups = {Update.class})
    private Integer roleId;

    private Integer userId;

    @NotBlank(message = "角色名称不能为空", groups = Create.class)
    private String roleName;

    @NotNull(message = "pageIndex不能为空", groups = GetList.class)
    private Integer pageIndex;

    @NotNull(message = "pageSize不能为空", groups = GetList.class)
    private Integer pageSize;

    public interface Create extends Default {
    }

    public interface Update extends Default {
    }

    public interface Login extends Default {
    }

    public interface GetList extends Default {
    }
}
